const mongoose = require('mongoose');
const assert = require('assert');

mongoose.connect('mongodb://localhost/admin');

var db = mongoose.connection;
db.on('err', console.error.bind(console, 'connection error:'))
db.once('open', function() {
    console.log('');
})
// models
require('./classify_model');
require('./user');
require('./article');


console.log('classify--', mongoose.model('Classify'));

module.exports = {
    Classify: mongoose.model('Classify'),
    User: mongoose.model('User'),
    Article: mongoose.model('Article')
};